package com.aspose.cells.a.d;

public class zdx extends zef {
   private zew b;
   private zdw c;
   private zew d;
   private zdh g;
   public int a = 0;

   public zdx(zdh var1, zdw var2) throws Exception {
      super(var1);
      this.c = var2;
      this.g = var1;
      if (var2.l()) {
         this.d = new zew(var1, true);
      }

   }

   public void a(zeg var1) throws Exception {
      this.b(var1);
      if (this.c.l()) {
         this.c.a(this.d.e());
         if (this.g.b().u()) {
            this.b.a(var1);
         }

         this.d.e().b(0L);
         this.d.a(var1);
      }

   }

   private void b(zeg var1) throws Exception {
      var1.a(this);
      var1.g();
      var1.a("/Type", "/FontDescriptor");
      var1.a("/FontName", com.aspose.cells.b.a.zv.a("/{0}", this.c.e()));
      int var2 = this.c.c.t().c;
      var1.a("/StemV", (var2 & '\uffff') / 65 * ((var2 & '\uffff') / 65));
      var1.a("/Descent", this.c.f());
      var1.a("/Ascent", this.c.g());
      var1.a("/CapHeight", this.c.h());
      var1.a("/Flags", this.c.i());
      var1.a("/ItalicAngle", this.c.k());
      var1.a("/FontBBox", this.c.j());
      var1.a("/FontWeight", var2 & '\uffff');
      if (this.c.l()) {
         if (this.g.b().u()) {
            this.b = new zew(this.g);
            if (this.a == 0) {
               this.b.a((byte)-128);
            } else if (this.a > 0) {
               int var3;
               for(var3 = 0; var3 < this.a / 8; ++var3) {
                  this.b.a((byte)-1);
               }

               var3 = this.a % 8;
               if (var3 > 0) {
                  this.b.a((byte)(255 << 8 - var3));
               }
            }

            var1.a("/CIDSet", this.b.n());
         }

         var1.a("/FontFile2", this.d.n());
      }

      var1.h();
      var1.b();
   }
}
